/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.alien.admin.modules.publisher.service.dto;

import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;
import java.util.Set;

/**
* @website https://el-admin.vip
* @description /
* @author zengzhifang
* @date 2021-10-18
**/
@Data
public class PublishSheetFlowDto implements Serializable {

    private Long id;

    /** 标题，格式如（服务[ztjy-file-serve#ztjy-upload]发布申请-某某人） */
    private String title;

    /** 流程编号 */
    private String flowNo;

    /** 发布时间 */
    private Timestamp publishTime;

    /** 申请人id */
    private Long applierId;

    private String applierName;
    private String jobName;

    /** 发布类型 0-需求发布 1-内部优化 2-修复bug 3-特殊需求 */
    private Integer publishType;

    /** 涉及线上库变动（0-否 1-是） */
    private Integer dbChanged;

    /** 涉及缓存逻辑变动（0-否 1-是） */
    private Integer cacheChanged;

    /** 风险评估 */
    private String riskAssessment;

    /** 数据库脚本（涉及库变动显示) */
    private String dbScript;

    /** 回滚脚本（涉及库变动显示) */
    private String rollbackDbScript;

    /** 统配 */
    private String configserverScript;

    /** 缓存脚本 */
    private String cacheScript;

    /** 备注 */
    private String remarks;

    /** 测试介入（0-否 1-是） */
    private Integer hasTester;

    /** 测试人员（测试介入是必选） */
    private Long testerId;
    private String testerName;

    /** 运维人员 */
    private Long deployerId;
    private String deployerName;

    /** 开发经理（角色为开发经理的用户列表） */
    private Long managerId;
    private String managerName;

    /** 创建时间 */
    private Timestamp createTime;

    /** 结束时间 */
    private Timestamp endTime;

    /** 部署次数 */
    private Integer deployNum;

    /** 0-起草 1-申请单提交（待主管审核）2-待测试确认 3.待运维RC确认4.待测试人员RC发布确认5.待开发人员RC发布确认  6.待运维PROD确认7.待测试PROD发布确认8.待开发人员发布确认 9.结束 */
    private Integer flowNodeId;

    /** 当前节点处理人id */
    private Long processerId;
    private String processerName;

    /** 0-草稿 1-进行中 2.结束 3.驳回 */
    private Integer flowStatus;

    /** 发布项目列表 */
    private Set<PublishProjectDto> publishProjects;
    /** 关联部署列表 */
    private Set<PublishDeployDto> publishDeploys;

    /** 有相同项目交集的冲突流程 */
    private List<PublishSheetFlowDto> conflictPublishSheetFlowList;

}